package com.dk.controller;

import com.dk.service.LambdaService;
import com.dk.service.impl.LambdaServiceImpl;

public class Demo_lambda {
    public static void main(String[] args) {
        //创建对象
        LambdaService l=new LambdaServiceImpl();
        //匿名内部类
        LambdaService l1=new LambdaService() {
            @Override
            public void add() {
                System.out.println("宋只乾大傻逼");
            }
        };
        //lambda匿名函数简化了匿名内部类
        LambdaService l2=()-> System.out.println("宋志乾太傻比了");
        l.add();
        l1.add();
        l2.add();
    }


}
